Formius.Element_Container_Group = $.inherit(Formius.Element_Container, {
	options: {
		showChildErrors: true
	},
	/*
	__constructor: function(element, form, settings) {
		console.log(arguments);
		this.__base(element, form, settings);
	},
	*/

	/**
	 * @param Array|String value
	 * @return Void
	 */
	setValue: function(value) {
		value = $.isArray(value)? value: [value];
		var i, name, len;
		for (i = 0, len = this._elements.length; i < len; i++) {
			name = this._elements[i].getName();
			if (typeof value[name] != 'undefined') {
				this._elements[i].setValue(value[name]);
			}
		}
		return value;
	},
	/**
	 * @return Array
	 */
	getValue: function() {
		var value = [], i, len;
		for (i = 0, len = this._elements.length; i < len; i++) {
			if (this._elements[i].getValue()) {
				value.push(this._elements[i].getName());
			}
		}
		return value;
	},/*
	getContainer: function() {
		var container = this.getElement().parents(this.getContainerSelector());
		if (container.size() <= 0) {
			container = this.getElement().parent();
		}
		return container;
	},*/
	getErrorTemplate: function() {
		return this.getForm().getSettings().errors.field;
	},
	validate: Formius.Element_Abstract.prototype.validate,
	count: function() {
		var count = 0, elements = this.getElements();
		for (var i = 0, len = elements.length; i < len; i++) {
			if (elements[i] && 'validate' in elements[i]) {
				count++;
			}
		}
		return count;
	}
});